package cs.rsa.ts14.juliet;

import static org.mockito.Mockito.mock;

import org.junit.Test;

import cs.rsa.ts14.alpha.InitialState;
import cs.rsa.ts14.doubles.LineSequenceStateStub;
import cs.rsa.ts14.doubles.LineTypeClassifierStrategyStub;
import cs.rsa.ts14.framework.ReportBuilder;
import cs.rsa.ts14.kilo.WeekOverviewBuilder;
import cs.rsa.ts14.lima.TransportOverviewReportBuilder;
import cs.rsa.ts14.manual.Timesag2;

/*
 * This class tests the integration of:
 * 
 * Group Alpha: LineSequenceState(s)
 * Group Juliet: StandardLineTypeClassifierStrategy
 * Group Kilo: WeekOverviewBuilder
 * Group Juliet: CategoryOverviewBuilder
 *  
 */
public class IntegrationTestTopDownDriver {
	
	private Timesag2 timesag; //Actual driver..
	
	@Test
	public void testIntegrationOfStandardTimesagsLineProcessor() {
		timesag = new Timesag2(mock(ReportBuilder.class), new LineTypeClassifierStrategyStub(),
				new LineSequenceStateStub());
		
		timesag.handleFile("resource/timesag.txt");	
	}

	@Test
	public void testIntegrationOfStates() {
		timesag = new Timesag2(mock(ReportBuilder.class), new LineTypeClassifierStrategyStub(),
				new InitialState());
		timesag.handleFile("resource/timesag.txt");	
	}

	@Test
	public void testIntegrationOfStandardLineTypeClassifierStrategyWithState() {
		timesag = new Timesag2(mock(ReportBuilder.class), new StandardLineTypeClassifierStrategy(),
				new InitialState());
		timesag.handleFile("resource/timesag.txt");	
	}

	@Test
	public void testOneCompleteIntegrationWithTransportOverview() {
		timesag = new Timesag2(new TransportOverviewReportBuilder(), new StandardLineTypeClassifierStrategy(),
				new InitialState());
		timesag.handleFile("resource/timesag.txt");	
	}
	
	@Test
	public void testOneCompleteIntegrationWithWeekOverview() {
		timesag = new Timesag2(new WeekOverviewBuilder(), new StandardLineTypeClassifierStrategy(),
				new InitialState());
		timesag.handleFile("resource/timesag.txt");	
	}
	
	@Test
	public void testOneCompleteIntegrationWithCategoryOverview() {
		timesag = new Timesag2(new CategoryOverviewBuilder(new StandardCategoryConstructor()), new StandardLineTypeClassifierStrategy(),
				new InitialState());
		timesag.handleFile("resource/timesag.txt");	
	}
	
}
